package com.test.gpa.repostitory;

import com.test.gpa.domain.Book;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SqlRepository extends JpaRepository<Book,Long> {


    @Query(value="select * from book where book_name=?",nativeQuery = true)
    List<Book> queryBookById(String name);
   @Query(value ="select * from book order by id limit ?1,?2" ,nativeQuery = true)
    List<Book> queryAllByPage(int start,int end);



}
